Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bastille0 loopback IPv6 support #727

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

foudfou
Copy link

@foudfou foudfou commented Nov 3, 2024

This PR makes sure that, for jails created with

bastille create xxx 14.1-RELEASE '192.168.100.117/24 2001:db8:ee00:ff00::117/64'
  1. All IPs (ip4 and ip6, and not their subnet) added into/removed from the <jails> pf table
  2. pf rdr rules for ip6 are present

ips=$(bastille config "${_jail}" get ip4.addr)
ips="${ips} $(bastille config "${_jail}" get ip6.addr)"
for ip in ${ips}; do
ip=$(printf "$ip" | sed -E 's,/[0-9]+,,')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pfctl -t jails -Tadd <IP>/<CIDR> actually adds the network, not the IP.

@foudfou
Copy link
Author

foudfou commented Nov 4, 2024

Oh I realized there was a PR #386 for the exact same issue #385 a couple of years back.

@bmac2
Copy link
Collaborator

bmac2 commented Dec 16, 2024

@foudfou this one has conflicts also. Please clean up so I can test.

@foudfou
Copy link
Author

foudfou commented Dec 17, 2024

@bmac2 rebased.

@foudfou
Copy link
Author

foudfou commented Dec 17, 2024

@bmac2 rebased again 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants